-
Notifications
You must be signed in to change notification settings - Fork 13
Feature/solver inspect geometry #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ontain colors as values and not material names. Private functions now start with _
…rial folder + forward the logger to solver if wake object is passed to constructor
…imported, with the materials and colors from dicts + the beam and integration path if wake object is passed, that can be toggled via checkboxes. Other minor changes to follow Ruff suggestions
…en`-->`off_screen`
… + ignore HTML outputs
Collaborator
Author
|
@copilot can you describe the changes in plotting.py? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Pull Request Summary
This pull request introduces a new method
SolverFIT3D.inspectthat allows to interactively show and hide the imported solids, beam and integration path in the simulation box using pyvista's checkbox widgets. It includes several improvements and refactors to the workflow setup and the 3D grid and geometry handling code, with a particular focus on STL/STEP file handling, plotting tests, and offscreen rendering support. The most significant changes include updating the test infrastructure for offscreen plotting, refactoring STL/STEP extraction utilities, and improving the grid initialization and STL color assignment logic.🔧 Changes Made
Visualization Improvements
plot_solids,plot_stl_mask, and added new methodinspect) to support thesmooth_shadingparameter, streamline color assignment, and remove redundant color mapping logic. This allows more flexible and direct color specification for STL solids. New methodsolver.inspectallows to interactively show and hide the imported solids, beam and integration path in the simulation box.Test infrastructure:
Updated all test workflows and plotting tests to support offscreen rendering by adding a
flag_offscreenvariable and using it consistently in plotting functions. Output images are now saved to dedicated folders for each test. (tests/test_003_planewave_sphere.py,tests/test_007_mpi_lossy_cavity.py,tests/test_008_3D_plotting.py) [1] [2] [3] [4] [5]Added a new comprehensive 3D plotting test suite in
tests/test_008_3D_plotting.py, covering grid inspection, solid plotting, STL mask visualization, solver inspection, and 3D field plotting, all with offscreen output.STL/STEP extraction and file handling:
wakis/geometry.pyto accept optional output paths, improved naming conventions, and made file export logic more robust. Functions now handle cases where no path is provided and ensure correct file naming and export. (extract_solids_from_stp,generate_stl_solids_from_stp) [1] [2] [3] [4]Grid initialization and STL color assignment:
wakis/gridFIT3D.pyby renaming several internal methods for clarity (prefixing with_), improving STL color assignment logic to handle dicts, lists, and single color strings robustly, and ensuring colors are assigned to all solids. [1] [2] [3]Workflow setup for VTK:
vtkpackage and installvtk-osmesafrom a custom wheel index, ensuring compatibility with offscreen rendering. (.github/workflows/manual_tests_CPU.yml,.github/workflows/nightly_tests_CPU.yml,.github/workflows/pull_request_CPU.yml) [1] [2] [3]Minor code cleanup:
✅ Checklist
docs/or included inexamples/andnotebooks/)📌 Related Issues / PRs
Closes #24